package com.learn.FunctionalInterface;

import java.util.function.Supplier;

/**
 * 就是没有入参的Fucntion
 *
 *
 * 拓展就是多种类型的返回值
 * IntSupplier  LongSupplier  DoubleSupplier  BooleanSupplier
 */
public class SupplierDemo {
    public static void main(String[] args) {
        Supplier<String> supplier = ()->{
            System.out.println("get()");
            return "hello 2021";
        };

        System.out.println(supplier.get());
    }
}
